package com.yeu.util;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

public class ConfigurationReader {
	static {
		String  path = ConfigurationReader.class.getClassLoader().getResource("").getPath();
		PROPERTIES_FILE=path+"Configuration.properties";
	}
	private static String PROPERTIES_FILE;
	
	public static String get(String key){
		Properties properties=new Properties();
		try {
			InputStream in=new BufferedInputStream(new FileInputStream(PROPERTIES_FILE));
			properties.load(in);
			in.close();
			String value=properties.getProperty(key);
			return value;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
